<template>
  <!-- <div>{{ countStore.count }}</div> -->
  <div>{{ count }}</div>
  <button @click="onPlus">+1</button>
</template>

<script setup lang="ts">
  import { useCountStore } from '@/store/modules/countStore'
  import { storeToRefs } from 'pinia'

  const countStore = useCountStore()
  const { count } = storeToRefs(countStore)

  const onPlus = () => {
    countStore.increase(1)
  }
</script>

<style lang="scss" scoped>
div {
  border:1px solid red;
}
</style>